﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="GeneratePIN.aspx.cs" Inherits="MMITPinGen.WebForm1" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">


        .style1
        {
            width: 100%;
        }
    
    </style>
    <link href="Styles/Site.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table class="style1">
        <tr>
            <td align="center">
                <asp:Label ID="lblMsg" runat="server" CssClass="bold"></asp:Label>
                <telerik:RadButton ID="lnkNew" runat="server" ButtonType="LinkButton" 
                        Text="Click Here to Generate New Batch" Visible="False" 
                        onclick="lnkNew_Click">
                </telerik:RadButton>
            </td>
        </tr>
        <tr>
            <td align="center">
                    &nbsp;</td>
        </tr>
        <tr>
            <td>
                <table id="tblForm" runat=server>
                    <tr>
                        <td align="right">
                    Partner</td>
                        <td align="left">
                            <telerik:RadComboBox ID="drpPartners" Runat="server"  DataTextField="Name" DataValueField="Id"
                       >
                            </telerik:RadComboBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="drpPartners" CssClass="textEntry" 
                        ErrorMessage="Please  Select Partner" ValidationGroup="Submit" 
                        InitialValue="0"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                    Batch
                    Name</td>
                        <td align="left">
                            <telerik:RadTextBox ID="txtName" Runat="server" Width="125px">
                            </telerik:RadTextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="txtName" CssClass="textEntry" 
                        ErrorMessage="Please Specify Batch Name" ValidationGroup="Submit"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" valign="top">
                    Voucher Value</td>
                        <td align="left">
                            <telerik:RadNumericTextBox ID="txtValue" Runat="server" 
                        Culture="en-GB" Type="Currency" Width="125px">
                            </telerik:RadNumericTextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                        ControlToValidate="txtValue" CssClass="textEntry" 
                        ErrorMessage="Please  Specify Voucher Value" ValidationGroup="Submit" 
                        InitialValue="0"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" valign="top">
                    Qantity</td>
                        <td align="left">
                            <telerik:RadComboBox ID="drpQuantity" Runat="server" 
                       >
                                <Items>
                                    <telerik:RadComboBoxItem runat="server" Selected="True" Text="Select Quantity" 
                                Value="0" Owner="drpQuantity" />
                                    <telerik:RadComboBoxItem runat="server" Text="500" Value="500" />
                                    <telerik:RadComboBoxItem runat="server" Text="1000" Value="1000" />
                                    <telerik:RadComboBoxItem runat="server" Text="2500" Value="2500" />
                                    <telerik:RadComboBoxItem runat="server" Text="5000" Value="5000" />
                                </Items>
                            </telerik:RadComboBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                        ControlToValidate="drpQuantity" CssClass="textEntry" 
                        ErrorMessage="Please  Select Quantity" ValidationGroup="Submit" 
                        InitialValue="0"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" valign="top">
                    PIN Length</td>
                        <td align="left">
                            <telerik:RadComboBox ID="drpPINLength" Runat="server" 
                       >
                                <Items>
                                    <telerik:RadComboBoxItem runat="server" Selected="True" Text="Select Pin Length" 
                                Value="0" Owner="drpPINLength" />
                                    <telerik:RadComboBoxItem runat="server" Text="12" Value="12" />
                                    <telerik:RadComboBoxItem runat="server" Text="13" Value="13" />
                                    <telerik:RadComboBoxItem runat="server" Text="14" Value="14" />
                                    <telerik:RadComboBoxItem runat="server" Text="15" Value="15" />
                                    <telerik:RadComboBoxItem runat="server" Text="16" Value="16" />
                                </Items>
                            </telerik:RadComboBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                        ControlToValidate="drpPINLength" CssClass="textEntry" 
                        ErrorMessage="Please  Select PIN Length" ValidationGroup="Submit" 
                        InitialValue="0"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" valign="top">
                    Serial Length</td>
                        <td align="left">
                            <telerik:RadComboBox ID="drpSerialLength" Runat="server" 
                       >
                                <Items>
                                    <telerik:RadComboBoxItem runat="server" Selected="True" Text="Select Pin Length" 
                                Value="0" Owner="drpSerialLength" />
                                    <telerik:RadComboBoxItem runat="server" Text="12" Value="12" />
                                    <telerik:RadComboBoxItem runat="server" Text="13" Value="13" />
                                    <telerik:RadComboBoxItem runat="server" Text="14" Value="14" />
                                    <telerik:RadComboBoxItem runat="server" Text="15" Value="15" />
                                    <telerik:RadComboBoxItem runat="server" Text="16" Value="16" />
                                </Items>
                            </telerik:RadComboBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                        ControlToValidate="drpSerialLength" CssClass="textEntry" 
                        ErrorMessage="Please  Select Serial Length" ValidationGroup="Submit" 
                        InitialValue="0"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" valign="top">
                    Serial Prefix</td>
                        <td align="left">
                            <telerik:RadTextBox ID="txtPrefix" Runat="server" Width="125px" 
                        CausesValidation="True">
                            </telerik:RadTextBox>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ControlToValidate="txtPrefix" ErrorMessage="Max Prefix Lenght is 3 Characters" 
                        ValidationExpression="^\s*([^\s]\s*){1,3}$" ValidationGroup="Submit"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                    Status</td>
                        <td align="left">
                            <telerik:RadComboBox ID="drpStatus" Runat="server" 
                       >
                                <Items>
                                    <telerik:RadComboBoxItem runat="server" Text="Inactive" Value="0" />
                                    <telerik:RadComboBoxItem runat="server" Selected="True" Text="Active" 
                                Value="1" />
                                </Items>
                            </telerik:RadComboBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                    &nbsp;</td>
                        <td align="left">
                            <telerik:RadButton ID="btnSubmit" runat="server" Text="Submit" 
                        onclick="btnSubmit_Click" ValidationGroup="Submit">
                            </telerik:RadButton>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                    &nbsp;</td>
        </tr>
    </table>
</asp:Content>
